//导入vue-router
import { createRouter, createWebHistory } from 'vue-router'
//导入组件
import MainVue from '@/views/main.vue'
import ColumnVue from '@/views/column.vue'
import ColumnDetail from '@/views/ColumnDetail.vue';
import ArticleDetail from '@/views/ArticleDetail.vue';
import ParentHeaderVue from '@/components/parentHeader.vue'
import NewsColumnDetail from '@/views/NewsColumnDetail.vue'
import AllArticles from '@/views/AllArticles.vue';
//定义路由关系
const routes = [
  { path: '/', component: MainVue, meta: { title: '济南美术馆-济南画院 首页' } },
  { path: '/column/:id', name: 'ColumnVue', component: ColumnVue, meta: { title: '济南美术馆-济南画院 栏目展示' } }, // 添加:id作为动态参数
  {
    path: '/column-detail/:id',
    name: 'ColumnDetail', 
    component: ColumnDetail ,
    meta:{ title: '济南美术馆-济南画院 栏目详情' }
  },
  {
    path: '/article-detail/:id',
    name: 'ArticleDetail',
    component: ArticleDetail,
    meta:{ title: '济南美术馆-济南画院 文章详情' }
  },
  {
    path: '/news-column-detail/:id',
    name: 'NewsColumnDetail',
    component: NewsColumnDetail
  },
  {
    path: '/all-articles/:id',
    name: 'AllArticles',
    component: AllArticles,
    meta:{ title: '济南美术馆-济南画院 文章列表' }
  },
  
]

//创建路由器
const router = createRouter({
  history: createWebHistory(),
  routes: routes
});

export default router